<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrderInvoicesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_order_invoices', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('order_id')->comment('订单id');
            $table->integer('type')->comment('发票类型');
            $table->string('content', 255)->comment('发票内容');
            $table->integer('head_type')->comment('抬头类型1个人2单位');
            $table->string('head_name', 100)->comment('抬头名称');
            $table->string('head_num', 25)->comment('公司统一信用代码');
            $table->string('name', 100)->comment('收票人名称');
            $table->string('phone', 11)->comment('电话');
            $table->string('province')->comment('省');
            $table->string('city')->comment('市');
            $table->string('county')->comment('县');
            $table->string('img')->default(null)->comment('发票连接');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_order_invoices');
    }
}
